package spring.listener;

import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;
import spring.listener.event.MyEvent;

@Component
public class MyListener implements ApplicationListener<MyEvent> {
    @Override
    public void onApplicationEvent(MyEvent event) {
        System.out.println("发生了一次自定义事件,成功监听到！");
    }
}
